package com.seio.edc.common;

import org.springframework.web.util.HtmlUtils;

/**
 * <p>
 * Project Name: EDC <br>
 * Description: <br>
 * File Name: HtmlConvert.java <br>
 * Copyright: Copyright (C) 2013 All Rights Reserved.
 */
public class HtmlConvert {

	public static String htmlconvert(String text) {
		text = text.replaceAll("<", "&lt;");
		return text.replaceAll(">", "&gt;");
	}

	public static String[] htmlConvert(String[] params) {
		String[] ret = new String[params.length];
		for (int idx = 0; idx < params.length; idx++) {
			ret[idx] = HtmlUtils.htmlEscape(params[idx]);
		}
		return ret;
	}
}
